package com.cch.cooperation.biz.common.lock;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * 锁注解
 *
 * @author cch on 2022/05/05
 **/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Locker {

    String key();

    String[] keys() default {};

    int timeout() default 5;

    int waitTimeout() default 10;

    TimeUnit timeUnit() default TimeUnit.SECONDS;
}
